import api from "@/api/index";

function imageFilter(md5, width) {
  return md5 ? api.getImageUrlByThumbnail(md5, width) : require("@/assets/images/default_picture.png");
}

function imageFilterByOriginal(md5) {
  return md5 ? api.getDownloadServiceUrl(md5) : require("@/assets/images/default_picture.png");
}

export default {
  imageFilter,
  imageFilterByOriginal
};
